projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merged silc_1_1_branch to trunk.
[silc.git]
/
lib
/
silccore
/
silcnotify.c
diff --git
a/lib/silccore/silcnotify.c
b/lib/silccore/silcnotify.c
index 4f6feacbda0a14c42aaff2f1d3c0dc8196b7fd1e..fc3dd8b28f559fe7ebcb9155def0a18fab29ea43 100644
(file)
--- a/
lib/silccore/silcnotify.c
+++ b/
lib/silccore/silcnotify.c
@@
-4,7
+4,7
@@
Author: Pekka Riikonen <priikone@silcnet.org>
Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2000 - 200
5
Pekka Riikonen
+ Copyright (C) 2000 - 200
7
Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-63,8
+63,11
@@
SilcNotifyPayload silc_notify_payload_parse(const unsigned char *payload,
if (newp->argc) {
silc_buffer_pull(&buffer, 5);
if (newp->argc) {
silc_buffer_pull(&buffer, 5);
- newp->args = silc_argument_payload_parse(buffer.data, silc_buffer_len(&buffer),
+ newp->args = silc_argument_payload_parse(buffer.data,
+ silc_buffer_len(&buffer),
newp->argc);
newp->argc);
+ if (!newp->args)
+ goto err;
silc_buffer_push(&buffer, 5);
}
silc_buffer_push(&buffer, 5);
}
@@
-142,11
+145,10
@@
SilcBuffer silc_notify_payload_encode(SilcNotifyType type, SilcUInt32 argc,
SILC_STR_END);
if (k) {
SILC_STR_END);
if (k) {
- silc_buffer_pull(buffer, 5);
silc_buffer_format(buffer,
silc_buffer_format(buffer,
- SILC_STR_UI_XNSTRING(args->data, silc_buffer_len(args)),
+ SILC_STR_OFFSET(5),
+ SILC_STR_DATA(args->data, silc_buffer_len(args)),
SILC_STR_END);
SILC_STR_END);
- silc_buffer_push(buffer, 5);
silc_buffer_free(args);
}
silc_buffer_free(args);
}
@@
-172,13
+174,11
@@
SilcBuffer silc_notify_payload_encode_args(SilcNotifyType type,
SILC_STR_UI_CHAR(argc),
SILC_STR_END);
SILC_STR_UI_CHAR(argc),
SILC_STR_END);
- if (args) {
- silc_buffer_pull(buffer, 5);
+ if (args)
silc_buffer_format(buffer,
silc_buffer_format(buffer,
- SILC_STR_UI_XNSTRING(args->data, silc_buffer_len(args)),
+ SILC_STR_OFFSET(5),
+ SILC_STR_DATA(args->data, silc_buffer_len(args)),
SILC_STR_END);
SILC_STR_END);
- silc_buffer_push(buffer, 5);
- }
return buffer;
}
return buffer;
}