GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
JAM_ChangeMsgHeader(3) JAM subroutine library JAM_ChangeMsgHeader(3)

JAM_ChangeMsgHeader - Change a message's header

#include <jamlib/jam.h>
int JAM_ChangeMsgHeader(s_JamBase*      Base_PS,
                        ulong           MsgNo_I,
                        s_JamMsgHeader* Header_PS);

Writes over an old message header with a new one. Only the header - not the subfields - can be changed due to the subfields´ dynamic size.

If message have MSG_DELETED attribute set, UserCRC field in index and ActiveMsgs in base header are also updated.

Base_PS
The message base to use
MsgNo_I
The absolute message number. Message #0 is the first in the message base.
Header_PS
A pointer to the header structure to write.

0
if successful
JAM_IO_ERROR
if an I/O error occured. See JAM_Errno(3)
JAM_NOT_LOCKED
if the message base is not locked

s_JamMsgHeader  Header_S;
int             Result_I;
/* [lock the message base] */
Result_I = JAM_ReadMsgHeader(Base_PS, 0, &Header_S, NULL);
if (Result_I)
  printf("JAM_ReadMsgHeader returned %d.\n", Result_I);
Header_S.TimesRead++;
Result_I = JAM_ChangeMsgHeader(Base_PS, 0, &Header_S);
if (Result_I)
  printf("JAM_ChangeMsgHeader returned %d.\n", Result_I);
/* [unlock the message base] */

Use this function with caution. It is easy to corrupt a message by giving it an incorrect header.

This manual page was created by Sir Raorn <raorn@altlinux.ru>, based on original JAMlib documentation by Bjorn Stenberg <bjorn@haxx.nu> and Johan Billing <billing@df.lth.se>.

jamlib(3), JAM_ReadMsgHeader(3), JAM_ClearMsgHeader(3), JAM_LockMB(3), JAM_Errno(3)
2002-11-07

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.