From ff65e26ce7567ea6a907e566f8530f4988231d68 Mon Sep 17 00:00:00 2001 From: malosek Date: Mon, 5 Oct 2009 10:22:12 +0200 Subject: create_custom_gsi.patch renamed to create_custom_gsi_1.patch --- foreign/openpgm/create_custom_gsi.patch | 43 ------------------------------- foreign/openpgm/create_custom_gsi_1.patch | 43 +++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 43 deletions(-) delete mode 100644 foreign/openpgm/create_custom_gsi.patch create mode 100644 foreign/openpgm/create_custom_gsi_1.patch (limited to 'foreign/openpgm') diff --git a/foreign/openpgm/create_custom_gsi.patch b/foreign/openpgm/create_custom_gsi.patch deleted file mode 100644 index 2e709f1..0000000 --- a/foreign/openpgm/create_custom_gsi.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- foreign/openpgm/libpgm-1.2.14/openpgm/pgm/include/pgm/gsi.h 2009-08-27 04:53:23.000000000 +0200 -+++ foreign/openpgm/libpgm-1.2.14/openpgm/pgm/include/pgm/gsi.h 2009-10-05 09:29:21.765126004 +0200 -@@ -42,6 +42,7 @@ - - int pgm_create_md5_gsi (pgm_gsi_t*); - int pgm_create_ipv4_gsi (pgm_gsi_t*); -+int pgm_create_custom_gsi (const char *string_, pgm_gsi_t*); - - int pgm_print_gsi_r (const pgm_gsi_t*, char*, gsize); - gchar* pgm_print_gsi (const pgm_gsi_t*); - ---- foreign/openpgm/libpgm-1.2.14/openpgm/pgm/gsi.c 2009-08-27 04:53:25.000000000 +0200 -+++ foreign/openpgm/libpgm-1.2.14/openpgm/pgm/gsi.c 2009-10-05 09:28:47.113125069 +0200 -@@ -430,6 +430,28 @@ - return retval; - } - -+/* create a global session ID as low order 48 bits of md5 of the string. */ -+int -+pgm_create_custom_gsi ( -+ const char *string_, -+ pgm_gsi_t* gsi_ -+ ) -+{ -+ g_return_val_if_fail (gsi_ != NULL, -EINVAL); -+ -+ struct md5_ctx ctx; -+ char resblock [16]; -+ -+ md5_init_ctx (&ctx); -+ md5_process_bytes (string_, strlen (string_), &ctx); -+ md5_finish_ctx (&ctx, resblock); -+ -+ memcpy (gsi_, resblock + 10, 6); -+ -+ return 0; -+} -+ -+ - /* re-entrant form of pgm_print_gsi() - */ - int - diff --git a/foreign/openpgm/create_custom_gsi_1.patch b/foreign/openpgm/create_custom_gsi_1.patch new file mode 100644 index 0000000..2e709f1 --- /dev/null +++ b/foreign/openpgm/create_custom_gsi_1.patch @@ -0,0 +1,43 @@ +--- foreign/openpgm/libpgm-1.2.14/openpgm/pgm/include/pgm/gsi.h 2009-08-27 04:53:23.000000000 +0200 ++++ foreign/openpgm/libpgm-1.2.14/openpgm/pgm/include/pgm/gsi.h 2009-10-05 09:29:21.765126004 +0200 +@@ -42,6 +42,7 @@ + + int pgm_create_md5_gsi (pgm_gsi_t*); + int pgm_create_ipv4_gsi (pgm_gsi_t*); ++int pgm_create_custom_gsi (const char *string_, pgm_gsi_t*); + + int pgm_print_gsi_r (const pgm_gsi_t*, char*, gsize); + gchar* pgm_print_gsi (const pgm_gsi_t*); + +--- foreign/openpgm/libpgm-1.2.14/openpgm/pgm/gsi.c 2009-08-27 04:53:25.000000000 +0200 ++++ foreign/openpgm/libpgm-1.2.14/openpgm/pgm/gsi.c 2009-10-05 09:28:47.113125069 +0200 +@@ -430,6 +430,28 @@ + return retval; + } + ++/* create a global session ID as low order 48 bits of md5 of the string. */ ++int ++pgm_create_custom_gsi ( ++ const char *string_, ++ pgm_gsi_t* gsi_ ++ ) ++{ ++ g_return_val_if_fail (gsi_ != NULL, -EINVAL); ++ ++ struct md5_ctx ctx; ++ char resblock [16]; ++ ++ md5_init_ctx (&ctx); ++ md5_process_bytes (string_, strlen (string_), &ctx); ++ md5_finish_ctx (&ctx, resblock); ++ ++ memcpy (gsi_, resblock + 10, 6); ++ ++ return 0; ++} ++ ++ + /* re-entrant form of pgm_print_gsi() + */ + int + -- cgit v1.2.3