27 |
#endif |
#endif |
28 |
|
|
29 |
extern char g_username[16]; |
extern char g_username[16]; |
30 |
extern char hostname[16]; |
extern char g_hostname[16]; |
31 |
|
|
32 |
static uint8 g_licence_key[16]; |
static uint8 g_licence_key[16]; |
33 |
static uint8 g_licence_sign_key[16]; |
static uint8 g_licence_sign_key[16]; |
56 |
licence_generate_hwid(uint8 * hwid) |
licence_generate_hwid(uint8 * hwid) |
57 |
{ |
{ |
58 |
buf_out_uint32(hwid, 2); |
buf_out_uint32(hwid, 2); |
59 |
strncpy((char *) (hwid + 4), hostname, LICENCE_HWID_SIZE - 4); |
strncpy((char *) (hwid + 4), g_hostname, LICENCE_HWID_SIZE - 4); |
60 |
} |
} |
61 |
|
|
62 |
/* Present an existing licence to the server */ |
/* Present an existing licence to the server */ |
174 |
return; |
return; |
175 |
} |
} |
176 |
|
|
177 |
licence_send_request(null_data, null_data, g_username, hostname); |
licence_send_request(null_data, null_data, g_username, g_hostname); |
178 |
} |
} |
179 |
|
|
180 |
/* Send an authentication response packet */ |
/* Send an authentication response packet */ |