Hello community, here is the log from the commit of package ulfius for openSUSE:Factory checked in at 2020-07-15 15:05:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ulfius (Old) and /work/SRC/openSUSE:Factory/.ulfius.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ulfius" Wed Jul 15 15:05:37 2020 rev:14 rq:820845 version:2.6.8 Changes: -------- --- /work/SRC/openSUSE:Factory/ulfius/ulfius.changes 2020-06-06 23:40:23.841102828 +0200 +++ /work/SRC/openSUSE:Factory/.ulfius.new.3060/ulfius.changes 2020-07-15 15:06:24.307491083 +0200 @@ -1,0 +2,17 @@ +Fri Jul 10 14:52:55 UTC 2020 - Martin Hauke <mar...@gmx.de> + +- Redownloaded source tarball + +------------------------------------------------------------------- +Tue Jul 7 19:46:09 UTC 2020 - Martin Hauke <mar...@gmx.de> + +- Update to version 2.6.8 + * Increase `ULFIUS_POSTBUFFERSIZE` to follow MHD documentation + * Adapt code to be compatible with all MHD version + * In case of secure websocket communication, use a combination of + `gnutls_record_check_pending()` and `poll()` to determine if + data is ready. + * Install uwsc manpage + * Fix bug about missing `res` variable assignment. + +------------------------------------------------------------------- Old: ---- ulfius-2.6.7.tar.gz New: ---- ulfius-2.6.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ulfius.spec ++++++ --- /var/tmp/diff_new_pack.hEYKZU/_old 2020-07-15 15:06:25.787492526 +0200 +++ /var/tmp/diff_new_pack.hEYKZU/_new 2020-07-15 15:06:25.791492530 +0200 @@ -20,7 +20,7 @@ %define _lto_cflags %{nil} %define sover 2_6 Name: ulfius -Version: 2.6.7 +Version: 2.6.8 Release: 0 Summary: Web Framework for REST Applications in C License: MIT @@ -81,7 +81,7 @@ %cmake \ -DCMAKE_SHARED_LINKER_FLAGS="" \ -DCMAKE_INSTALL_PREFIX:PATH=/ -make %{?_smp_mflags} +%make_build %install %cmake_install @@ -104,5 +104,6 @@ %files -n uwsc %{_bindir}/uwsc +%{_mandir}/man1/uwsc.1%{?ext_man} %changelog ++++++ ulfius-2.6.7.tar.gz -> ulfius-2.6.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/CHANGELOG.md new/ulfius-2.6.8/CHANGELOG.md --- old/ulfius-2.6.7/CHANGELOG.md 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/CHANGELOG.md 2020-07-09 14:03:51.000000000 +0200 @@ -1,5 +1,13 @@ # Ulfius Changelog +## 2.6.8 + +- Increase `ULFIUS_POSTBUFFERSIZE` to follow MHD documentation +- Adapt code to be compatible with all MHD version +- In case of secure websocket communication, use a combination of `gnutls_record_check_pending()` and `poll()` to determine if data is ready. (Thanks **Wouter van Herpen**!) +- Install uwsc manpage +- Fix bug about missing `res` variable assignment. (Thanks **Gianfranco Costamagna**!) + ## 2.6.7 - Check header property case insensitive in websocket client diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/CMakeLists.txt new/ulfius-2.6.8/CMakeLists.txt --- old/ulfius-2.6.7/CMakeLists.txt 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/CMakeLists.txt 2020-07-09 14:03:51.000000000 +0200 @@ -30,7 +30,7 @@ set(PROJECT_BUGREPORT_PATH "https://github.com/babelouest/ulfius/issues") set(LIBRARY_VERSION_MAJOR "2") set(LIBRARY_VERSION_MINOR "6") -set(LIBRARY_VERSION_PATCH "7") +set(LIBRARY_VERSION_PATCH "8") set(PROJECT_VERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY_VERSION_PATCH}") set(PROJECT_VERSION_MAJOR ${LIBRARY_VERSION_MAJOR}) @@ -56,8 +56,8 @@ set(LIBRARY_VERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY_VERSION_PATCH}") set(LIBRARY_SOVERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}") -set(ORCANIA_VERSION_REQUIRED "2.1.0") -set(YDER_VERSION_REQUIRED "1.4.10") +set(ORCANIA_VERSION_REQUIRED "2.1.1") +set(YDER_VERSION_REQUIRED "1.4.11") set(JANSSON_VERSION_REQUIRED "2.1") # cmake modules @@ -130,7 +130,7 @@ set(WITH_WEBSOCKET OFF) endif () -if (WITH_WEBSOCKET) +if (WITH_WEBSOCKET AND NOT ${RELEASE_CODENAME} STREQUAL "stretch") set(MHD_MIN_VERSION 0.9.53) else () set(MHD_MIN_VERSION 0.9.51) @@ -320,6 +320,7 @@ add_dependencies(uwsc ulfius) target_link_libraries(uwsc ulfius ${LIBS}) install(TARGETS uwsc RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + INSTALL(FILES ${UWSC_DIR}/uwsc.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT runtime) endif () set(PKGCONF_REQ "") @@ -410,7 +411,7 @@ endif () if (INSTALL_HEADER) -install(TARGETS ${TARGETS} + install(TARGETS ${TARGETS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/INSTALL.md new/ulfius-2.6.8/INSTALL.md --- old/ulfius-2.6.7/INSTALL.md 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/INSTALL.md 2020-07-09 14:03:51.000000000 +0200 @@ -115,6 +115,15 @@ $ make CURLFLAG=1 JANSSONFLAG=1 ``` +#### Install libulfius as a static archive + +Install libulfius as a static archive, `libulfius.a`, use the make commands `make static*`: + +```shell +$ cd src +$ make static && sudo make static-install # or make DESTDIR=/tmp static-install if you want to install in `/tmp/lib` +``` + #### Enable embedded systems flags To build Ulfius on [FreeRTOS](https://www.freertos.org/), append the option `FREERTOSFLAG=1` to the make command when you build Ulfius: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/README.md new/ulfius-2.6.8/README.md --- old/ulfius-2.6.7/README.md 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/README.md 2020-07-09 14:03:51.000000000 +0200 @@ -2,6 +2,8 @@ [![Build Status](https://travis-ci.com/babelouest/ulfius.svg?branch=master)](https://travis-ci.com/babelouest/ulfius) ![.github/workflows/ccpp.yml](https://github.com/babelouest/ulfius/workflows/.github/workflows/ccpp.yml/badge.svg) +[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3195/badge)](https://bestpractices.coreinfrastructure.org/projects/3195) +[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/git...@babelouest.org) HTTP Framework for REST Applications in C. @@ -122,4 +124,6 @@ ## Questions, problems ? -I'm open for questions and suggestions, feel free to open an issue or send a pull request if you feel like it! +I'm open for questions and suggestions, feel free to open an [issue](https://github.com/babelouest/ulfius/issues), a [pull request](https://github.com/babelouest/ulfius/pulls) or send me an [e-mail](mailto:m...@babelouest.org) if you feel like it! + +You can visit the IRC channel #ulfius on the [Freenode](https://freenode.net/) network. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/cmake-modules/FindMHD.cmake new/ulfius-2.6.8/cmake-modules/FindMHD.cmake --- old/ulfius-2.6.7/cmake-modules/FindMHD.cmake 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/cmake-modules/FindMHD.cmake 2020-07-09 14:03:51.000000000 +0200 @@ -1,5 +1,5 @@ #.rst: -# FindJansson +# FindMHD # ----------- # # Find libmicrohttpd @@ -58,7 +58,7 @@ endif () include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(mhd +find_package_handle_standard_args(MHD REQUIRED_VARS MHD_LIBRARY MHD_INCLUDE_DIR VERSION_VAR MHD_VERSION_STRING) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/include/ulfius.h new/ulfius-2.6.8/include/ulfius.h --- old/ulfius-2.6.7/include/ulfius.h 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/include/ulfius.h 2020-07-09 14:03:51.000000000 +0200 @@ -1730,7 +1730,7 @@ #define ULFIUS_COOKIE_ATTRIBUTE_SECURE "Secure" #define ULFIUS_COOKIE_ATTRIBUTE_HTTPONLY "HttpOnly" -#define ULFIUS_POSTBUFFERSIZE 1024 +#define ULFIUS_POSTBUFFERSIZE 65536 #define U_STATUS_STOP 0 #define U_STATUS_RUNNING 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/src/Makefile new/ulfius-2.6.8/src/Makefile --- old/ulfius-2.6.7/src/Makefile 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/src/Makefile 2020-07-09 14:03:51.000000000 +0200 @@ -40,7 +40,7 @@ OUTPUT=libulfius.so VERSION_MAJOR=2 VERSION_MINOR=6 -VERSION_PATCH=7 +VERSION_PATCH=8 ifndef JANSSONFLAG DISABLE_JANSSON=0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/src/u_send_request.c new/ulfius-2.6.8/src/u_send_request.c --- old/ulfius-2.6.7/src/u_send_request.c 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/src/u_send_request.c 2020-07-09 14:03:51.000000000 +0200 @@ -864,8 +864,8 @@ break; } - if (curl_easy_perform(curl_handle) != CURLE_OK) { - y_log_message(Y_LOG_LEVEL_ERROR, "Ulfius - Error sending smtp message, error message %s", curl_easy_strerror(res)); + if ((res = curl_easy_perform(curl_handle)) != CURLE_OK) { + y_log_message(Y_LOG_LEVEL_ERROR, "Ulfius - Error sending smtp message, error message '%s'", curl_easy_strerror(res)); ret = U_ERROR_LIBCURL; break; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/src/u_websocket.c new/ulfius-2.6.8/src/u_websocket.c --- old/ulfius-2.6.7/src/u_websocket.c 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/src/u_websocket.c 2020-07-09 14:03:51.000000000 +0200 @@ -55,6 +55,11 @@ static int is_websocket_data_available(struct _websocket_manager * websocket_manager) { int ret = 0, poll_ret = 0; + if (websocket_manager->tls) { + ret = gnutls_record_check_pending(websocket_manager->gnutls_session); + if (ret) + return ret; + } poll_ret = poll(&websocket_manager->fds, 1, U_WEBSOCKET_USEC_WAIT); if (poll_ret == -1) { y_log_message(Y_LOG_LEVEL_ERROR, "Ulfius - Error poll websocket read"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/src/ulfius.c new/ulfius-2.6.8/src/ulfius.c --- old/ulfius-2.6.7/src/ulfius.c 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/src/ulfius.c 2020-07-09 14:03:51.000000000 +0200 @@ -61,7 +61,11 @@ /** * Fill a map with the key/values specified */ +#if MHD_VERSION >= 0x00097002 +static enum MHD_Result ulfius_fill_map_check_utf8(void * cls, enum MHD_ValueKind kind, const char * key, const char * value) { +#else static int ulfius_fill_map_check_utf8(void * cls, enum MHD_ValueKind kind, const char * key, const char * value) { +#endif char * tmp; int res; UNUSED(kind); @@ -94,7 +98,11 @@ /** * Fill a map with the key/values specified */ +#if MHD_VERSION >= 0x00097002 +static enum MHD_Result ulfius_fill_map(void * cls, enum MHD_ValueKind kind, const char * key, const char * value) { +#else static int ulfius_fill_map(void * cls, enum MHD_ValueKind kind, const char * key, const char * value) { +#endif char * tmp; int res; UNUSED(kind); @@ -124,7 +132,11 @@ * ulfius_is_valid_endpoint * return true if the endpoind has valid parameters */ +#if MHD_VERSION >= 0x00097002 +static enum MHD_Result ulfius_is_valid_endpoint(const struct _u_endpoint * endpoint, int to_delete) { +#else static int ulfius_is_valid_endpoint(const struct _u_endpoint * endpoint, int to_delete) { +#endif if (endpoint != NULL) { if (ulfius_equals_endpoints(endpoint, ulfius_empty_endpoint())) { // Should be the last endpoint of the list to close it @@ -290,10 +302,15 @@ * if a parameter is larger than max_post_param_size, truncate it * return MHD_NO on error */ +#if MHD_VERSION >= 0x00097002 +static enum MHD_Result mhd_iterate_post_data (void * coninfo_cls, enum MHD_ValueKind kind, const char * key, + const char * filename, const char * content_type, + const char * transfer_encoding, const char * data, uint64_t off, size_t size) { +#else static int mhd_iterate_post_data (void * coninfo_cls, enum MHD_ValueKind kind, const char * key, const char * filename, const char * content_type, const char * transfer_encoding, const char * data, uint64_t off, size_t size) { - +#endif struct connection_info_struct * con_info = coninfo_cls; size_t cur_size = size; char * data_dup, * filename_param; @@ -352,14 +369,25 @@ * function executed by libmicrohttpd every time an HTTP call is made * return MHD_NO on error */ -static int ulfius_webservice_dispatcher (void * cls, +#if MHD_VERSION >= 0x00097002 +static enum MHD_Result ulfius_webservice_dispatcher (void * cls, + struct MHD_Connection * connection, + const char * url, + const char * method, + const char * version, + const char * upload_data, + size_t * upload_data_size, + void ** con_cls) { +#else +static int ulfius_webservice_dispatcher (void * cls, struct MHD_Connection * connection, - const char * url, + const char * url, const char * method, - const char * version, + const char * version, const char * upload_data, - size_t * upload_data_size, + size_t * upload_data_size, void ** con_cls) { +#endif struct _u_endpoint * endpoint_list = ((struct _u_instance *)cls)->endpoint_list, ** current_endpoint_list = NULL, * current_endpoint = NULL; struct connection_info_struct * con_info = * con_cls; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/test/core.c new/ulfius-2.6.8/test/core.c --- old/ulfius-2.6.7/test/core.c 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/test/core.c 2020-07-09 14:03:51.000000000 +0200 @@ -910,7 +910,11 @@ { struct _u_instance u_instance; struct MHD_OptionItem mhd_ops[3]; +#ifndef U_DISABLE_WEBSOCKET unsigned int mhd_flags = MHD_USE_THREAD_PER_CONNECTION|MHD_ALLOW_UPGRADE; +#else + unsigned int mhd_flags = MHD_USE_THREAD_PER_CONNECTION; +#endif ck_assert_int_eq(ulfius_init_instance(&u_instance, 8081, NULL, NULL), U_OK); ck_assert_int_eq(ulfius_add_endpoint_by_val(&u_instance, "GET", NULL, "test", 0, &callback_function_empty, NULL), U_OK); @@ -1039,7 +1043,7 @@ int number_failed; Suite *s; SRunner *sr; - y_init_logs("Ulfius", Y_LOG_MODE_CONSOLE, Y_LOG_LEVEL_DEBUG, NULL, "Starting Ulfius core tests"); + //y_init_logs("Ulfius", Y_LOG_MODE_CONSOLE, Y_LOG_LEVEL_DEBUG, NULL, "Starting Ulfius core tests"); s = ulfius_suite(); sr = srunner_create(s); @@ -1047,6 +1051,6 @@ number_failed = srunner_ntests_failed(sr); srunner_free(sr); - y_close_logs(); + //y_close_logs(); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/test/framework.c new/ulfius-2.6.8/test/framework.c --- old/ulfius-2.6.7/test/framework.c 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/test/framework.c 2020-07-09 14:03:51.000000000 +0200 @@ -202,7 +202,7 @@ int addrlen = sizeof(address); if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) != 0) { - if (!setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, &opt, sizeof(opt))) { + if (!setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt))) { address.sin_family = AF_INET; address.sin_addr.s_addr = INADDR_ANY; address.sin_port = htons( manager->port ); @@ -1116,7 +1116,8 @@ } END_TEST -#define PORT 2525 +#define PORT_PLAIN 2525 +#define PORT_RICH 2526 #define FROM "from" #define TO "to" #define CC "cc" @@ -1131,17 +1132,17 @@ struct smtp_manager manager; manager.mail_data = NULL; - manager.port = PORT; + manager.port = PORT_PLAIN; manager.sockfd = 0; - ck_assert_int_eq(ulfius_send_smtp_email("localhost", PORT, 0, 0, NULL, NULL, FROM, TO, CC, BCC, SUBJECT, BODY), U_ERROR_LIBCURL); - ck_assert_int_eq(ulfius_send_smtp_email(NULL, PORT, 0, 0, NULL, NULL, FROM, TO, CC, BCC, SUBJECT, BODY), U_ERROR_PARAMS); - ck_assert_int_eq(ulfius_send_smtp_email("localhost", PORT, 0, 0, NULL, NULL, NULL, TO, CC, BCC, SUBJECT, BODY), U_ERROR_PARAMS); - ck_assert_int_eq(ulfius_send_smtp_email("localhost", PORT, 0, 0, NULL, NULL, FROM, NULL, CC, BCC, SUBJECT, BODY), U_ERROR_PARAMS); - ck_assert_int_eq(ulfius_send_smtp_email("localhost", PORT, 0, 0, NULL, NULL, FROM, TO, CC, BCC, SUBJECT, NULL), U_ERROR_PARAMS); + ck_assert_int_eq(ulfius_send_smtp_email("localhost", PORT_PLAIN, 0, 0, NULL, NULL, FROM, TO, CC, BCC, SUBJECT, BODY), U_ERROR_LIBCURL); + ck_assert_int_eq(ulfius_send_smtp_email(NULL, PORT_PLAIN, 0, 0, NULL, NULL, FROM, TO, CC, BCC, SUBJECT, BODY), U_ERROR_PARAMS); + ck_assert_int_eq(ulfius_send_smtp_email("localhost", PORT_PLAIN, 0, 0, NULL, NULL, NULL, TO, CC, BCC, SUBJECT, BODY), U_ERROR_PARAMS); + ck_assert_int_eq(ulfius_send_smtp_email("localhost", PORT_PLAIN, 0, 0, NULL, NULL, FROM, NULL, CC, BCC, SUBJECT, BODY), U_ERROR_PARAMS); + ck_assert_int_eq(ulfius_send_smtp_email("localhost", PORT_PLAIN, 0, 0, NULL, NULL, FROM, TO, CC, BCC, SUBJECT, NULL), U_ERROR_PARAMS); pthread_create(&thread, NULL, simple_smtp, &manager); - ck_assert_int_eq(ulfius_send_smtp_email("localhost", PORT, 0, 0, NULL, NULL, FROM, TO, CC, BCC, SUBJECT, BODY), U_OK); + ck_assert_int_eq(ulfius_send_smtp_email("localhost", PORT_PLAIN, 0, 0, NULL, NULL, FROM, TO, CC, BCC, SUBJECT, BODY), U_OK); pthread_join(thread, NULL); ck_assert_ptr_ne(NULL, o_strstr(manager.mail_data, "HELO")); ck_assert_ptr_ne(NULL, o_strstr(manager.mail_data, "MAIL FROM:<" FROM ">")); @@ -1161,11 +1162,11 @@ struct smtp_manager manager; manager.mail_data = NULL; - manager.port = PORT; + manager.port = PORT_RICH; manager.sockfd = 0; pthread_create(&thread, NULL, simple_smtp, &manager); - ck_assert_int_eq(ulfius_send_smtp_rich_email("localhost", PORT, 0, 0, NULL, NULL, FROM, TO, CC, BCC, CONTENT_TYPE, SUBJECT, BODY), U_OK); + ck_assert_int_eq(ulfius_send_smtp_rich_email("localhost", PORT_RICH, 0, 0, NULL, NULL, FROM, TO, CC, BCC, CONTENT_TYPE, SUBJECT, BODY), U_OK); pthread_join(thread, NULL); ck_assert_ptr_ne(NULL, o_strstr(manager.mail_data, "HELO")); ck_assert_ptr_ne(NULL, o_strstr(manager.mail_data, "MAIL FROM:<" FROM ">")); @@ -1352,7 +1353,7 @@ int number_failed; Suite *s; SRunner *sr; - y_init_logs("Ulfius", Y_LOG_MODE_CONSOLE, Y_LOG_LEVEL_DEBUG, NULL, "Starting Ulfius core tests"); + //y_init_logs("Ulfius", Y_LOG_MODE_CONSOLE, Y_LOG_LEVEL_DEBUG, NULL, "Starting Ulfius framework tests"); s = ulfius_suite(); sr = srunner_create(s); @@ -1360,6 +1361,6 @@ number_failed = srunner_ntests_failed(sr); srunner_free(sr); - y_close_logs(); + //y_close_logs(); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/tools/uwsc/Makefile new/ulfius-2.6.8/tools/uwsc/Makefile --- old/ulfius-2.6.7/tools/uwsc/Makefile 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/tools/uwsc/Makefile 2020-07-09 14:03:51.000000000 +0200 @@ -31,7 +31,7 @@ LIBS=-lc -lulfius -lorcania $(LYDER) -L$(ULFIUS_LOCATION) REMOTE_URL=http://localhost:9275/websocket/echo -COMMAND=./uwsc --output-log-file=out.log $(REMOTE_URL) +COMMAND=./uwsc --output-log-file out.log $(REMOTE_URL) all: uwsc @@ -56,7 +56,12 @@ LD_LIBRARY_PATH=$(ULFIUS_LOCATION):${LD_LIBRARY_PATH} valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all $(COMMAND) 2>valgrind.txt install: uwsc - cp uwsc $(DESTDIR)/bin + mkdir -p $(DESTDIR)/bin $(DESTDIR)/man/man1/ + install -m755 uwsc $(DESTDIR)/bin + install -m644 uwsc.1 $(DESTDIR)/man/man1/ uninstall: rm -f $(DESTDIR)/bin/uwsc + +manpage: + help2man uwsc -s 1 -n "Command-line websocket client" > uwsc.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/tools/uwsc/README.md new/ulfius-2.6.8/tools/uwsc/README.md --- old/ulfius-2.6.7/tools/uwsc/README.md 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/tools/uwsc/README.md 2020-07-09 14:03:51.000000000 +0200 @@ -4,7 +4,7 @@ Copyright 2018-2020 Nicolas Mora <m...@babelouest.org> -This program is free software; you can redistribute it and/or modify it under the terms of the MIT License. +This program is free software; you can redistribute it and/or modify it under the terms of the GPL3 License. ## Overview @@ -14,7 +14,7 @@ ## Options -uwsc has some options available: +Options available: ```shell -o --output-log-file=PATH @@ -44,7 +44,7 @@ Print this message ``` -### Examples +## Examples Here are some examples on how to use uwsc options diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/tools/uwsc/uwsc.1 new/ulfius-2.6.8/tools/uwsc/uwsc.1 --- old/ulfius-2.6.7/tools/uwsc/uwsc.1 1970-01-01 01:00:00.000000000 +0100 +++ new/ulfius-2.6.8/tools/uwsc/uwsc.1 2020-07-09 14:03:51.000000000 +0200 @@ -0,0 +1,75 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8. +.TH UWSC "1" "July 2020" "uwsc 0.10" "User Commands" +.SH NAME +uwsc \- Command-line websocket client +.SH DESCRIPTION +uwsc \- Ulfius Websocket Client +.PP +Version 0.10 +.SH COPYRIGHT +Copyright 2018\-2020 Nicolas Mora <m...@babelouest.org> +.PP +This program is free software; you can redistribute it and/or +modify it under the terms of the MIT LICENSE +.PP +Command\-line options: +.PP +\fB\-o\fR \fB\-\-output\-log\-file\fR=\fI\,PATH\/\fR +.IP +Print yder log messages in a file +.PP +\fB\-x\fR \fB\-\-add\-header\fR=\fI\,HEADER\/\fR +.IP +Add the specified header of the form 'key:value' +.PP +\fB\-b\fR \fB\-\-send\-binary\-file\fR=\fI\,PATH\/\fR +.IP +Sends the content of a file at the beginning of the connection in a binary frame +.PP +\fB\-t\fR \fB\-\-send\-text\-file\fR=\fI\,PATH\/\fR +.IP +Sends the content of a file at the beginning of the connection in a text frame +.PP +\fB\-i\fR \fB\-\-non\-interactive\-send\fR +.IP +Do not prompt for message sending +.PP +\fB\-l\fR \fB\-\-non\-listening\fR +.IP +Do not listen for incoming messages +.PP +\fB\-f\fR \fB\-\-fragmentation=\fR +.IP +Specify the max length of a frame and fragment the message to send if required, 0 means no fragmentation, default 0 +.PP +\fB\-p\fR \fB\-\-protocol\fR=\fI\,PROTOCOL\/\fR +.IP +Specify the Websocket Protocol values, default none +.PP +\fB\-e\fR \fB\-\-extensions\fR=\fI\,EXTENSION\/\fR +.IP +Specify the Websocket extensions values, default none +.PP +\fB\-s\fR \fB\-\-non\-secure\fR +.IP +Do not check server certificate +.PP +\fB\-v\fR \fB\-\-version\fR +.IP +Print uwsc's current version +.PP +\fB\-h\fR \fB\-\-help\fR +.IP +Print this message +.SH "SEE ALSO" +The full documentation for +.B uwsc +is maintained as a Texinfo manual. If the +.B info +and +.B uwsc +programs are properly installed at your site, the command +.IP +.B info uwsc +.PP +should give you access to the complete manual. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ulfius-2.6.7/tools/uwsc/uwsc.c new/ulfius-2.6.8/tools/uwsc/uwsc.c --- old/ulfius-2.6.7/tools/uwsc/uwsc.c 2020-06-03 23:58:58.000000000 +0200 +++ new/ulfius-2.6.8/tools/uwsc/uwsc.c 2020-07-09 14:03:51.000000000 +0200 @@ -271,7 +271,7 @@ int main (int argc, char ** argv) { struct _config * config; int next_option; - const char * short_options = "o::x::b::t::i::l::f::p::e::s::v::h::"; + const char * short_options = "o:x:b:t:i::l::f:p:e::s::v::h::"; static const struct option long_options[]= { {"output-log-file", required_argument, NULL, 'o'}, // Sets an output file for logging messages {"add-header", required_argument, NULL, 'x'}, // Add the specified header of the form 'key:value'