big int to stdint switch

This commit is contained in:
van Hauser 2017-07-05 08:48:00 +02:00
parent 74931e3b58
commit f124c26fc6
73 changed files with 1364 additions and 1235 deletions

View file

@ -1,4 +1,3 @@
/*
* Apple Filing Protocol Support - by David Maciejak @ GMAIL dot com
*
@ -27,7 +26,7 @@ void dummy_afp() {
extern char *HYDRA_EXIT;
void stdout_fct(void *priv, enum loglevels loglevel, int logtype, const char *message) {
void stdout_fct(void *priv, enum loglevels loglevel, int32_t logtype, const char *message) {
//fprintf(stderr, "[ERROR] Caught unknown error %s\n", message);
}
@ -39,7 +38,7 @@ static struct libafpclient afpclient = {
.loop_started = NULL,
};
static int server_subconnect(struct afp_url url) {
static int32_t server_subconnect(struct afp_url url) {
struct afp_connection_request *conn_req;
struct afp_server *server = NULL;
@ -78,7 +77,7 @@ static int server_subconnect(struct afp_url url) {
return 0;
}
int start_afp(int s, char *ip, int port, unsigned char options, char *miscptr, FILE * fp) {
int32_t start_afp(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
char *empty = "";
char *login, *pass, mlogin[AFP_MAX_USERNAME_LEN], mpass[AFP_MAX_PASSWORD_LEN];
struct afp_url tmpurl;
@ -119,9 +118,9 @@ int start_afp(int s, char *ip, int port, unsigned char options, char *miscptr, F
return 1;
}
void service_afp(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname) {
int run = 1, next_run = 1, sock = -1;
int myport = PORT_AFP;
void service_afp(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
int32_t run = 1, next_run = 1, sock = -1;
int32_t myport = PORT_AFP;
hydra_register_socket(sp);
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
@ -140,7 +139,7 @@ void service_afp(char *ip, int sp, unsigned char options, char *miscptr, FILE *
port = myport;
}
if (sock < 0) {
if (quiet != 1) fprintf(stderr, "[ERROR] Child with pid %d terminating, can not connect\n", (int) getpid());
if (quiet != 1) fprintf(stderr, "[ERROR] Child with pid %d terminating, can not connect\n", (int32_t) getpid());
hydra_child_exit(1);
}
@ -173,7 +172,7 @@ void service_afp(char *ip, int sp, unsigned char options, char *miscptr, FILE *
#endif
int service_afp_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname) {
int32_t service_afp_init(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
// called before the childrens are forked off, so this is the function
// which should be filled if initial connections and service setup has to be
// performed once only.