Backport of r544:
Define PROTOTYPES to be one by default in global.h. This affects the RSA MD5 code. git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@546 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
parent
21163f491d
commit
1b45bec411
@ -2,9 +2,14 @@
|
|||||||
Version 1.6.7
|
Version 1.6.7
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
|
|
||||||
|
2010-04-25 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
|
||||||
|
Define PROTOTYPES to be one by default in global.h. This affects the
|
||||||
|
RSA MD5 code.
|
||||||
|
|
||||||
2010-03-27 Nick Leverton <nick@leverton.org>
|
2010-03-27 Nick Leverton <nick@leverton.org>
|
||||||
Subscription auto-renewals copy the renewal time from old subscription.
|
Subscription auto-renewals copy the renewal time from old subscription.
|
||||||
|
|
||||||
|
|
||||||
2010-03-27 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
|
2010-03-27 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
|
||||||
Backport of svn revision 527:
|
Backport of svn revision 527:
|
||||||
* Added API to ithread, created the following functions:
|
* Added API to ithread, created the following functions:
|
||||||
|
@ -38,13 +38,13 @@
|
|||||||
/* PROTOTYPES should be set to one if and only if the compiler supports
|
/* PROTOTYPES should be set to one if and only if the compiler supports
|
||||||
function argument prototyping.
|
function argument prototyping.
|
||||||
|
|
||||||
The following makes PROTOTYPES default to 0 if it has not already
|
The following makes PROTOTYPES default to 1 if it has not already
|
||||||
been defined with C compiler flags.
|
been defined with C compiler flags.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef PROTOTYPES
|
#ifndef PROTOTYPES
|
||||||
#define PROTOTYPES 0
|
#define PROTOTYPES 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* POINTER defines a generic pointer type */
|
/* POINTER defines a generic pointer type */
|
||||||
|
@ -83,7 +83,7 @@ typedef struct {
|
|||||||
|
|
||||||
void get_ieee_node_identifier(uuid_node_t *node);
|
void get_ieee_node_identifier(uuid_node_t *node);
|
||||||
void get_system_time(uuid_time_t *uuid_time);
|
void get_system_time(uuid_time_t *uuid_time);
|
||||||
void get_random_info(char seed[16]);
|
void get_random_info(unsigned char seed[16]);
|
||||||
|
|
||||||
|
|
||||||
#endif /* SYSDEP_H */
|
#endif /* SYSDEP_H */
|
||||||
|
@ -18,14 +18,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#ifdef WIN32
|
|
||||||
#include <winsock2.h>
|
|
||||||
#else /* WIN32 */
|
#include "sysdep.h"
|
||||||
#include <unistd.h>
|
|
||||||
#endif /* WIN32 */
|
|
||||||
|
#include "UpnpInet.h"
|
||||||
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "sysdep.h"
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
/*
|
/*
|
||||||
@ -35,7 +37,7 @@
|
|||||||
void
|
void
|
||||||
get_ieee_node_identifier(uuid_node_t *node)
|
get_ieee_node_identifier(uuid_node_t *node)
|
||||||
{
|
{
|
||||||
char seed[16];
|
unsigned char seed[16];
|
||||||
static int inited = 0;
|
static int inited = 0;
|
||||||
static uuid_node_t saved_node;
|
static uuid_node_t saved_node;
|
||||||
|
|
||||||
@ -140,7 +142,7 @@ get_system_time(uuid_time_t *uuid_time)
|
|||||||
|
|
||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
get_random_info(char seed[16])
|
get_random_info(unsigned char seed[16])
|
||||||
{
|
{
|
||||||
MD5_CTX c;
|
MD5_CTX c;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -159,7 +161,7 @@ get_random_info(char seed[16])
|
|||||||
|
|
||||||
/* MD5 it */
|
/* MD5 it */
|
||||||
MD5Init(&c);
|
MD5Init(&c);
|
||||||
MD5Update(&c, &r, sizeof r);
|
MD5Update(&c, (unsigned char *)&r, sizeof r);
|
||||||
MD5Final(seed, &c);
|
MD5Final(seed, &c);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -320,7 +320,7 @@ uuid_create_from_name( uuid_upnp * uid, /* resulting UUID */
|
|||||||
net_nsid.time_hi_and_version=htons( net_nsid.time_hi_and_version );
|
net_nsid.time_hi_and_version=htons( net_nsid.time_hi_and_version );
|
||||||
|
|
||||||
MD5Init( &c );
|
MD5Init( &c );
|
||||||
MD5Update( &c, &net_nsid, sizeof( uuid_upnp ) );
|
MD5Update( &c, (unsigned char *)&net_nsid, sizeof(uuid_upnp) );
|
||||||
MD5Update( &c, name, namelen );
|
MD5Update( &c, name, namelen );
|
||||||
MD5Final( hash, &c );
|
MD5Final( hash, &c );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user