Warmcat homepage andy@warmcat.com
libwebsockets
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1749528350, "reponame":"openssl", "desc":"OpenSSL", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/openssl", "f":3, "items": [ {"schema":"libjg2-1", "cid":"4ff62e5f5cd290aa232dfddb71c471ee", "commit": {"type":"commit", "time": 1529774310, "time_ofs": 120, "oid_tree": { "oid": "b8cd402a4391000a182b69a7aa5ce93b369ed4e1", "alias": []}, "oid":{ "oid": "24fa4b8df03c3fc8f100c1fbc44a7157b138d44a", "alias": []}, "msg": "Replace accidentally used C99 macro __func__ with __FILE__/__LINE__", "sig_commit": { "git_time": { "time": 1529774310, "offset": 120 }, "name": "Bernd Edlinger", "email": "bernd.edlinger@hotmail.de", "md5": "954aa9518ec67215541482fb5302b745" }, "sig_author": { "git_time": { "time": 1529653289, "offset": 120 }, "name": "Bernd Edlinger", "email": "bernd.edlinger@hotmail.de", "md5": "954aa9518ec67215541482fb5302b745" }}, "body": "Replace accidentally used C99 macro __func__ with __FILE__/__LINE__\n\nReviewed-by: Matt Caswell \u003cmatt@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/6558)\n" , "diff": "diff --git a/engines/e_afalg.c b/engines/e_afalg.c\nindex 54cecdd..f09c396 100644\n--- a/engines/e_afalg.c\n+++ b/engines/e_afalg.c\n@@ -148,7 +148,7 @@ static int afalg_setup_async_event_notification(afalg_aio *aio)\n /* Async mode */\n waitctx \u003d ASYNC_get_wait_ctx(job);\n if (waitctx \u003d\u003d NULL) {\n- ALG_WARN(\u0022%s: ASYNC_get_wait_ctx error\u0022, __func__);\n+ ALG_WARN(\u0022%s(%d): ASYNC_get_wait_ctx error\u0022, __FILE__, __LINE__);\n return 0;\n }\n /* Get waitfd from ASYNC_WAIT_CTX if it is already set */\n@@ -161,7 +161,8 @@ static int afalg_setup_async_event_notification(afalg_aio *aio)\n */\n aio-\u003eefd \u003d eventfd(0);\n if (aio-\u003eefd \u003d\u003d -1) {\n- ALG_PERR(\u0022%s: Failed to get eventfd : \u0022, __func__);\n+ ALG_PERR(\u0022%s(%d): Failed to get eventfd : \u0022, __FILE__,\n+ __LINE__);\n AFALGerr(AFALG_F_AFALG_SETUP_ASYNC_EVENT_NOTIFICATION,\n AFALG_R_EVENTFD_FAILED);\n return 0;\n@@ -170,14 +171,14 @@ static int afalg_setup_async_event_notification(afalg_aio *aio)\n aio-\u003eefd, custom,\n afalg_waitfd_cleanup);\n if (ret \u003d\u003d 0) {\n- ALG_WARN(\u0022%s: Failed to set wait fd\u0022, __func__);\n+ ALG_WARN(\u0022%s(%d): Failed to set wait fd\u0022, __FILE__, __LINE__);\n close(aio-\u003eefd);\n return 0;\n }\n /* make fd non-blocking in async mode */\n if (fcntl(aio-\u003eefd, F_SETFL, O_NONBLOCK) !\u003d 0) {\n- ALG_WARN(\u0022%s: Failed to set event fd as NONBLOCKING\u0022,\n- __func__);\n+ ALG_WARN(\u0022%s(%d): Failed to set event fd as NONBLOCKING\u0022,\n+ __FILE__, __LINE__);\n }\n }\n aio-\u003emode \u003d MODE_ASYNC;\n@@ -185,7 +186,7 @@ static int afalg_setup_async_event_notification(afalg_aio *aio)\n /* Sync mode */\n aio-\u003eefd \u003d eventfd(0);\n if (aio-\u003eefd \u003d\u003d -1) {\n- ALG_PERR(\u0022%s: Failed to get eventfd : \u0022, __func__);\n+ ALG_PERR(\u0022%s(%d): Failed to get eventfd : \u0022, __FILE__, __LINE__);\n AFALGerr(AFALG_F_AFALG_SETUP_ASYNC_EVENT_NOTIFICATION,\n AFALG_R_EVENTFD_FAILED);\n return 0;\n@@ -203,7 +204,7 @@ static int afalg_init_aio(afalg_aio *aio)\n aio-\u003eaio_ctx \u003d 0;\n r \u003d io_setup(MAX_INFLIGHTS, \u0026aio-\u003eaio_ctx);\n if (r \u003c 0) {\n- ALG_PERR(\u0022%s: io_setup error : \u0022, __func__);\n+ ALG_PERR(\u0022%s(%d): io_setup error : \u0022, __FILE__, __LINE__);\n AFALGerr(AFALG_F_AFALG_INIT_AIO, AFALG_R_IO_SETUP_FAILED);\n return 0;\n }\n@@ -257,7 +258,7 @@ static int afalg_fin_cipher_aio(afalg_aio *aio, int sfd, unsigned char *buf,\n */\n r \u003d io_read(aio-\u003eaio_ctx, 1, \u0026cb);\n if (r \u003c 0) {\n- ALG_PWARN(\u0022%s: io_read failed : \u0022, __func__);\n+ ALG_PWARN(\u0022%s(%d): io_read failed : \u0022, __FILE__, __LINE__);\n return 0;\n }\n \n@@ -270,11 +271,11 @@ static int afalg_fin_cipher_aio(afalg_aio *aio, int sfd, unsigned char *buf,\n if (r \u003c 0) {\n if (errno \u003d\u003d EAGAIN || errno \u003d\u003d EWOULDBLOCK)\n continue;\n- ALG_PERR(\u0022%s: read failed for event fd : \u0022, __func__);\n+ ALG_PERR(\u0022%s(%d): read failed for event fd : \u0022, __FILE__, __LINE__);\n return 0;\n } else if (r \u003d\u003d 0 || eval \u003c\u003d 0) {\n- ALG_WARN(\u0022%s: eventfd read %d bytes, eval \u003d %lu\u005cn\u0022, __func__, r,\n- eval);\n+ ALG_WARN(\u0022%s(%d): eventfd read %d bytes, eval \u003d %lu\u005cn\u0022, __FILE__,\n+ __LINE__, r, eval);\n }\n if (eval \u003e 0) {\n \n@@ -294,8 +295,8 @@ static int afalg_fin_cipher_aio(afalg_aio *aio, int sfd, unsigned char *buf,\n if (events[0].res \u003d\u003d -EBUSY \u0026\u0026 retry++ \u003c 3) {\n r \u003d io_read(aio-\u003eaio_ctx, 1, \u0026cb);\n if (r \u003c 0) {\n- ALG_PERR(\u0022%s: retry %d for io_read failed : \u0022,\n- __func__, retry);\n+ ALG_PERR(\u0022%s(%d): retry %d for io_read failed : \u0022,\n+ __FILE__, __LINE__, retry);\n return 0;\n }\n continue;\n@@ -305,18 +306,19 @@ static int afalg_fin_cipher_aio(afalg_aio *aio, int sfd, unsigned char *buf,\n * condition for this instance of operation.\n */\n ALG_WARN\n- (\u0022%s: Crypto Operation failed with code %lld\u005cn\u0022,\n- __func__, events[0].res);\n+ (\u0022%s(%d): Crypto Operation failed with code %lld\u005cn\u0022,\n+ __FILE__, __LINE__, events[0].res);\n return 0;\n }\n }\n /* Operation successful. */\n done \u003d 1;\n } else if (r \u003c 0) {\n- ALG_PERR(\u0022%s: io_getevents failed : \u0022, __func__);\n+ ALG_PERR(\u0022%s(%d): io_getevents failed : \u0022, __FILE__, __LINE__);\n return 0;\n } else {\n- ALG_WARN(\u0022%s: io_geteventd read 0 bytes\u005cn\u0022, __func__);\n+ ALG_WARN(\u0022%s(%d): io_geteventd read 0 bytes\u005cn\u0022, __FILE__,\n+ __LINE__);\n }\n }\n } while (!done);\n@@ -352,7 +354,7 @@ static ossl_inline int afalg_set_key(afalg_ctx *actx, const unsigned char *key,\n int ret;\n ret \u003d setsockopt(actx-\u003ebfd, SOL_ALG, ALG_SET_KEY, key, klen);\n if (ret \u003c 0) {\n- ALG_PERR(\u0022%s: Failed to set socket option : \u0022, __func__);\n+ ALG_PERR(\u0022%s(%d): Failed to set socket option : \u0022, __FILE__, __LINE__);\n AFALGerr(AFALG_F_AFALG_SET_KEY, AFALG_R_SOCKET_SET_KEY_FAILED);\n return 0;\n }\n@@ -376,21 +378,21 @@ static int afalg_create_sk(afalg_ctx *actx, const char *ciphertype,\n \n actx-\u003ebfd \u003d socket(AF_ALG, SOCK_SEQPACKET, 0);\n if (actx-\u003ebfd \u003d\u003d -1) {\n- ALG_PERR(\u0022%s: Failed to open socket : \u0022, __func__);\n+ ALG_PERR(\u0022%s(%d): Failed to open socket : \u0022, __FILE__, __LINE__);\n AFALGerr(AFALG_F_AFALG_CREATE_SK, AFALG_R_SOCKET_CREATE_FAILED);\n goto err;\n }\n \n r \u003d bind(actx-\u003ebfd, (struct sockaddr *)\u0026sa, sizeof(sa));\n if (r \u003c 0) {\n- ALG_PERR(\u0022%s: Failed to bind socket : \u0022, __func__);\n+ ALG_PERR(\u0022%s(%d): Failed to bind socket : \u0022, __FILE__, __LINE__);\n AFALGerr(AFALG_F_AFALG_CREATE_SK, AFALG_R_SOCKET_BIND_FAILED);\n goto err;\n }\n \n actx-\u003esfd \u003d accept(actx-\u003ebfd, NULL, 0);\n if (actx-\u003esfd \u003c 0) {\n- ALG_PERR(\u0022%s: Socket Accept Failed : \u0022, __func__);\n+ ALG_PERR(\u0022%s(%d): Socket Accept Failed : \u0022, __FILE__, __LINE__);\n AFALGerr(AFALG_F_AFALG_CREATE_SK, AFALG_R_SOCKET_ACCEPT_FAILED);\n goto err;\n }\n@@ -452,8 +454,8 @@ static int afalg_start_cipher_sk(afalg_ctx *actx, const unsigned char *in,\n /* Sendmsg() sends iv and cipher direction to the kernel */\n sbytes \u003d sendmsg(actx-\u003esfd, \u0026msg, 0);\n if (sbytes \u003c 0) {\n- ALG_PERR(\u0022%s: sendmsg failed for zero copy cipher operation : \u0022,\n- __func__);\n+ ALG_PERR(\u0022%s(%d): sendmsg failed for zero copy cipher operation : \u0022,\n+ __FILE__, __LINE__);\n return 0;\n }\n \n@@ -463,13 +465,13 @@ static int afalg_start_cipher_sk(afalg_ctx *actx, const unsigned char *in,\n */\n ret \u003d vmsplice(actx-\u003ezc_pipe[1], \u0026iov, 1, SPLICE_F_GIFT);\n if (ret \u003c 0) {\n- ALG_PERR(\u0022%s: vmsplice failed : \u0022, __func__);\n+ ALG_PERR(\u0022%s(%d): vmsplice failed : \u0022, __FILE__, __LINE__);\n return 0;\n }\n \n ret \u003d splice(actx-\u003ezc_pipe[0], NULL, actx-\u003esfd, NULL, inl, 0);\n if (ret \u003c 0) {\n- ALG_PERR(\u0022%s: splice failed : \u0022, __func__);\n+ ALG_PERR(\u0022%s(%d): splice failed : \u0022, __FILE__, __LINE__);\n return 0;\n }\n # else\n@@ -479,7 +481,8 @@ static int afalg_start_cipher_sk(afalg_ctx *actx, const unsigned char *in,\n /* Sendmsg() sends iv, cipher direction and input data to the kernel */\n sbytes \u003d sendmsg(actx-\u003esfd, \u0026msg, 0);\n if (sbytes \u003c 0) {\n- ALG_PERR(\u0022%s: sendmsg failed for cipher operation : \u0022, __func__);\n+ ALG_PERR(\u0022%s(%d): sendmsg failed for cipher operation : \u0022, __FILE__,\n+ __LINE__);\n return 0;\n }\n \n@@ -502,18 +505,18 @@ static int afalg_cipher_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,\n char ciphername[ALG_MAX_SALG_NAME];\n \n if (ctx \u003d\u003d NULL || key \u003d\u003d NULL) {\n- ALG_WARN(\u0022%s: Null Parameter\u005cn\u0022, __func__);\n+ ALG_WARN(\u0022%s(%d): Null Parameter\u005cn\u0022, __FILE__, __LINE__);\n return 0;\n }\n \n if (EVP_CIPHER_CTX_cipher(ctx) \u003d\u003d NULL) {\n- ALG_WARN(\u0022%s: Cipher object NULL\u005cn\u0022, __func__);\n+ ALG_WARN(\u0022%s(%d): Cipher object NULL\u005cn\u0022, __FILE__, __LINE__);\n return 0;\n }\n \n actx \u003d EVP_CIPHER_CTX_get_cipher_data(ctx);\n if (actx \u003d\u003d NULL) {\n- ALG_WARN(\u0022%s: Cipher data NULL\u005cn\u0022, __func__);\n+ ALG_WARN(\u0022%s(%d): Cipher data NULL\u005cn\u0022, __FILE__, __LINE__);\n return 0;\n }\n \n@@ -525,14 +528,15 @@ static int afalg_cipher_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,\n strncpy(ciphername, \u0022cbc(aes)\u0022, ALG_MAX_SALG_NAME);\n break;\n default:\n- ALG_WARN(\u0022%s: Unsupported Cipher type %d\u005cn\u0022, __func__, ciphertype);\n+ ALG_WARN(\u0022%s(%d): Unsupported Cipher type %d\u005cn\u0022, __FILE__, __LINE__,\n+ ciphertype);\n return 0;\n }\n ciphername[ALG_MAX_SALG_NAME-1]\u003d'\u005c0';\n \n if (ALG_AES_IV_LEN !\u003d EVP_CIPHER_CTX_iv_length(ctx)) {\n- ALG_WARN(\u0022%s: Unsupported IV length :%d\u005cn\u0022, __func__,\n- EVP_CIPHER_CTX_iv_length(ctx));\n+ ALG_WARN(\u0022%s(%d): Unsupported IV length :%d\u005cn\u0022, __FILE__, __LINE__,\n+ EVP_CIPHER_CTX_iv_length(ctx));\n return 0;\n }\n \n@@ -572,7 +576,8 @@ static int afalg_do_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,\n char nxtiv[ALG_AES_IV_LEN] \u003d { 0 };\n \n if (ctx \u003d\u003d NULL || out \u003d\u003d NULL || in \u003d\u003d NULL) {\n- ALG_WARN(\u0022NULL parameter passed to function %s\u005cn\u0022, __func__);\n+ ALG_WARN(\u0022NULL parameter passed to function %s(%d)\u005cn\u0022, __FILE__,\n+ __LINE__);\n return 0;\n }\n \n@@ -619,7 +624,8 @@ static int afalg_cipher_cleanup(EVP_CIPHER_CTX *ctx)\n afalg_ctx *actx;\n \n if (ctx \u003d\u003d NULL) {\n- ALG_WARN(\u0022NULL parameter passed to function %s\u005cn\u0022, __func__);\n+ ALG_WARN(\u0022NULL parameter passed to function %s(%d)\u005cn\u0022, __FILE__,\n+ __LINE__);\n return 0;\n }\n \n","s":{"c":1749351865,"u": 45659}} ],"g": 2012,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "7d0a"}