File: client_id.diff

package info (click to toggle)
pysilc 0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 328 kB
  • ctags: 411
  • sloc: ansic: 1,985; python: 617; makefile: 7
file content (19 lines) | stat: -rw-r--r-- 694 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Corrects the number of bytes in SilcUser.user_id.
Author: Michael Gorven <michael@gorven.za.net>
Forwarded: http://developer.berlios.de/patch/?func=detailpatch&patch_id=2694&group_id=6260
Last-Update: 2009-02-12

=== modified file 'pysilc-0.5/src/pysilc_user.c'
--- a/src/pysilc_user.c
+++ b/src/pysilc_user.c
@@ -149,9 +149,7 @@
     if (PyObject_Cmp(temp, name, &result) == -1)
         goto cleanup;
     if (result == 0) {
-        char buf[224];
-        memcpy(&buf, &(pyuser->silcobj->id), 224);
-        value = PyString_FromStringAndSize(buf, 224);
+        value = PyString_FromStringAndSize(&(pyuser->silcobj->id), sizeof(SilcClientID));
         goto cleanup;
     }