|
|
@ -90,7 +90,7 @@ int eport_ejabberd_msgread(char *buffer, size_t buffer_size,
|
|
|
|
if(!m) goto ieinval;
|
|
|
|
if(!m) goto ieinval;
|
|
|
|
|
|
|
|
|
|
|
|
/* calc hash for first message word till the end or till the ':' */
|
|
|
|
/* calc hash for first message word till the end or till the ':' */
|
|
|
|
while(((c = *buffer++) != '\0') || (*buffer == ':'))
|
|
|
|
while(((c = *buffer++) != '\0') && (c != ':'))
|
|
|
|
hash = ((hash << 5) + hash) + c;
|
|
|
|
hash = ((hash << 5) + hash) + c;
|
|
|
|
|
|
|
|
|
|
|
|
switch(hash) {
|
|
|
|
switch(hash) {
|
|
|
@ -108,7 +108,7 @@ int eport_ejabberd_msgread(char *buffer, size_t buffer_size,
|
|
|
|
m->msg_data = orig_buffer;
|
|
|
|
m->msg_data = orig_buffer;
|
|
|
|
m->user = m->domain = m->password = NULL;
|
|
|
|
m->user = m->domain = m->password = NULL;
|
|
|
|
/* shift a pointer */
|
|
|
|
/* shift a pointer */
|
|
|
|
c = *buffer++; orig_buffer = buffer;
|
|
|
|
c = *buffer; orig_buffer = buffer;
|
|
|
|
|
|
|
|
|
|
|
|
while((buffer = strchr(buffer, ':')) != NULL) {
|
|
|
|
while((buffer = strchr(buffer, ':')) != NULL) {
|
|
|
|
switch(t) {
|
|
|
|
switch(t) {
|
|
|
|