[OpenSIPS/opensips] b67ae4: lib: Add basic CSV line parsing primitives

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OpenSIPS/opensips] b67ae4: lib: Add basic CSV line parsing primitives

Liviu Chircu
  Branch: refs/heads/feature/freeswitch-extended-integration
  Home:   https://github.com/OpenSIPS/opensips
  Commit: b67ae459f41be008714abafc81a218a2a0c724a0
      https://github.com/OpenSIPS/opensips/commit/b67ae459f41be008714abafc81a218a2a0c724a0
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    A lib/csv.c
    A lib/csv.h

  Log Message:
  -----------
  lib: Add basic CSV line parsing primitives


  Commit: a1f968c41c6e59ee8c68cea07cd44a87c81ed4e1
      https://github.com/OpenSIPS/opensips/commit/a1f968c41c6e59ee8c68cea07cd44a87c81ed4e1
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    A lib/url.c
    A lib/url.h

  Log Message:
  -----------
  lib: Add generic URL parsing support

Very re-usable (db/db.c, cachedb/cachedb_id.c, modules/freeswitch/fs_api.c,
MongoDB, etc.). Importing code can easily customize their URLs by
enforcing/relaxing: scheme part, user part, pass part, ports, database and
extra hosts.

This patch also adds a new URL extension: parameters!

Syntax: scheme://...?foo=bar,foo

Refer to lib/url.h for the full spec


  Commit: 078199c3d025b2a6f1895295f12e36b187284680
      https://github.com/OpenSIPS/opensips/commit/078199c3d025b2a6f1895295f12e36b187284680
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M ut.h

  Log Message:
  -----------
  util: Add str2short()


  Commit: 7355324bd5bde7a49432d3b3004dad45cf6c2169
      https://github.com/OpenSIPS/opensips/commit/7355324bd5bde7a49432d3b3004dad45cf6c2169
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M lib/url.c

  Log Message:
  -----------
  lib/url: Improve logging and robustness


  Commit: a9ec3fcc8e3c1f81a0637fb87868c897cbe766d4
      https://github.com/OpenSIPS/opensips/commit/a9ec3fcc8e3c1f81a0637fb87868c897cbe766d4
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M lib/url.h

  Log Message:
  -----------
  lib/url: Add some header documentation


  Commit: acd3f8d99aafada13bb02eed5ae6cf46d83e8743
      https://github.com/OpenSIPS/opensips/commit/acd3f8d99aafada13bb02eed5ae6cf46d83e8743
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M lib/csv.h

  Log Message:
  -----------
  lib/csv: Add some header docs


  Commit: d7b742cd3756a8e7ebddfb6938f698295ac1990a
      https://github.com/OpenSIPS/opensips/commit/d7b742cd3756a8e7ebddfb6938f698295ac1990a
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M lib/csv.c
    M lib/csv.h
    M lib/osips_malloc.h
    M lib/url.c
    M modules/tm/mi.c
    M str.h
    A str_list.h

  Log Message:
  -----------
  Code refactoring

    * expose tm's "struct str_list" as a core header
    * get rid of "struct csv_record", swap for "struct str_list"
    * refactor all code dependencies


  Commit: a96b2a3f68922d0ae395e2c1919aeef3903c0358
      https://github.com/OpenSIPS/opensips/commit/a96b2a3f68922d0ae395e2c1919aeef3903c0358
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    R lib/osips_malloc.c
    M lib/osips_malloc.h
    M str_list.h

  Log Message:
  -----------
  lib/osips_malloc: Inline all functions


  Commit: 2e60c4c3d2c8dd5da187fe26a7c12d1854d7334a
      https://github.com/OpenSIPS/opensips/commit/2e60c4c3d2c8dd5da187fe26a7c12d1854d7334a
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M modules/dispatcher/dispatch.c
    M modules/dispatcher/dispatcher.c
    M modules/freeswitch/fs_api.c
    M modules/freeswitch/fs_api.h
    M modules/freeswitch/fs_mod.c
    M modules/freeswitch/fs_proc.c
    M modules/load_balancer/lb_data.c
    M modules/load_balancer/load_balancer.c

  Log Message:
  -----------
  freeswitch: Refactor API

    * add generic FS event subscribe/unsubscribe function stubs
    * new modparam: "event_heartbeat_interval"
    * expose "event_heartbeat_interval" in API, use wherever needed
    * improve naming for stats-based socket API functions
    * remove the callback-based support for updating stats
      (this never worked anyway, ds/lb would always pull data)


  Commit: 43f76cc2585be0014a099944828e3e2c7a20c4f3
      https://github.com/OpenSIPS/opensips/commit/43f76cc2585be0014a099944828e3e2c7a20c4f3
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M modules/freeswitch/fs_api.h

  Log Message:
  -----------
  freeswitch: Extend API with sub/unsub functions

This makes the API more logical - easier to understand and use.


  Commit: c035747dbb2c21ae3c3141de358a9d583cf91577
      https://github.com/OpenSIPS/opensips/commit/c035747dbb2c21ae3c3141de358a9d583cf91577
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M modules/freeswitch/fs_api.c

  Log Message:
  -----------
  freeswitch: Implement get_evs() / put_evs()


  Commit: e25a81d5d1160cccc9d249d79e28d4715d23453e
      https://github.com/OpenSIPS/opensips/commit/e25a81d5d1160cccc9d249d79e28d4715d23453e
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M ipc.c
    M ipc.h
    M modules/event_routing/event_routing.c
    M net/net_tcp_report.c

  Log Message:
  -----------
  ipc: Improve and document the API


  Commit: 298b1deaa2d0a1d08a203a79f151e346c8dd6638
      https://github.com/OpenSIPS/opensips/commit/298b1deaa2d0a1d08a203a79f151e346c8dd6638
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M reactor.h

  Log Message:
  -----------
  reactor.h: Improve variable naming

Easier to figure out the time measuring unit


  Commit: 9b333e3de696254afc1415ed48a96028b8117f47
      https://github.com/OpenSIPS/opensips/commit/9b333e3de696254afc1415ed48a96028b8117f47
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M modules/freeswitch/fs_api.c
    M modules/freeswitch/fs_api.h
    M modules/freeswitch/fs_mod.c
    M modules/freeswitch/fs_proc.c
    M modules/freeswitch/fs_proc.h
    M reactor_defs.h

  Log Message:
  -----------
  freeswitch: Extend API / further implement logic

    * implement evs_sub() / evs_unsub()
    * extend API with fs_cli() function
    * new modparam: "esl_connect_timeout"

Major refactoring of data structs and extra proc flow to support
the above.


  Commit: c8b3e136884401ad71f6197eb963b7001222aafc
      https://github.com/OpenSIPS/opensips/commit/c8b3e136884401ad71f6197eb963b7001222aafc
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M ipc.c
    M ipc.h
    M main.c
    M modules/event_routing/event_routing.c
    M net/net_tcp_proc.c
    M net/net_tcp_report.c
    M net/net_udp.c
    M timer.c

  Log Message:
  -----------
  ipc: Add job dispatching support

This patch adds support to dispatch a job to a currently available
TCP, UDP or timer OpenSIPS worker.

We also revert the incorrect function refactoring done in commit 69142efd59f.


  Commit: 644fb2e081e2a54127dc363ca20be6460c778d5b
      https://github.com/OpenSIPS/opensips/commit/644fb2e081e2a54127dc363ca20be6460c778d5b
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M timer.c

  Log Message:
  -----------
  ipc: Do not dispatch jobs to extra timer processes


  Commit: 3c56ddb5eb1bc3e8721cf358b8288753c7230555
      https://github.com/OpenSIPS/opensips/commit/3c56ddb5eb1bc3e8721cf358b8288753c7230555
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M modules/freeswitch/Makefile
    M modules/freeswitch/fs_api.h
    A modules/freeswitch/fs_ipc.c
    A modules/freeswitch/fs_ipc.h
    M modules/freeswitch/fs_mod.c
    M modules/freeswitch/fs_proc.c
    A modules/freeswitch_scripting/Makefile
    A modules/freeswitch_scripting/fss_api.c
    A modules/freeswitch_scripting/fss_api.h
    A modules/freeswitch_scripting/fss_evs.c
    A modules/freeswitch_scripting/fss_evs.h
    A modules/freeswitch_scripting/fss_ipc.c
    A modules/freeswitch_scripting/fss_ipc.h
    A modules/freeswitch_scripting/fss_mod.c

  Log Message:
  -----------
  Add a new "freeswitch_scripting" module

With a basic structure:

    * MI function stubs
    * script function stubs
    * (hope)fully implemented IPC interaction with "freeswitch"

Patch includes some "freeswitch" refactoring to get everything working.


  Commit: 5ce28ccad2ca03fd8d17d1cf4947ec080673444a
      https://github.com/OpenSIPS/opensips/commit/5ce28ccad2ca03fd8d17d1cf4947ec080673444a
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M str_list.h

  Log Message:
  -----------
  str_list: Add a doubly linked string list structure


  Commit: 346e0bd5bbc254ae4f82f2c9e263c598332c09c2
      https://github.com/OpenSIPS/opensips/commit/346e0bd5bbc254ae4f82f2c9e263c598332c09c2
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M lib/url.h
    M modules/freeswitch/fs_api.c
    M modules/freeswitch/fs_api.h
    M modules/freeswitch/fs_proc.c
    M modules/freeswitch_scripting/fss_evs.c
    M modules/freeswitch_scripting/fss_evs.h
    M modules/freeswitch_scripting/fss_mod.c

  Log Message:
  -----------
  freeswitch_scripting: Implement modparam subscriptions

Also remove the "func" concept from the FS subscription API. It is no
longer needed, as the IPC communication between the two modules takes
care of providing this handler.


  Commit: 0c281c7432b5fb7732fa98b1402de1432f8e39b6
      https://github.com/OpenSIPS/opensips/commit/0c281c7432b5fb7732fa98b1402de1432f8e39b6
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M str.h

  Log Message:
  -----------
  str.h: Add some handy zero-string test macros


  Commit: 79721336cafc87680d7fc80c4eb2ae1b5450076c
      https://github.com/OpenSIPS/opensips/commit/79721336cafc87680d7fc80c4eb2ae1b5450076c
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M modules/freeswitch/fs_api.c
    M modules/freeswitch_scripting/fss_mod.c

  Log Message:
  -----------
  freeswitch_scripting: Implement the fs_cli() script function


  Commit: 5e098c5aa57c047d4b33b70b14a456eaf1583509
      https://github.com/OpenSIPS/opensips/commit/5e098c5aa57c047d4b33b70b14a456eaf1583509
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M modules/freeswitch/fs_api.c

  Log Message:
  -----------
  freeswitch: Fix socket updating logic


  Commit: fa05cf54db845074e25e7133a840a0412888a2c5
      https://github.com/OpenSIPS/opensips/commit/fa05cf54db845074e25e7133a840a0412888a2c5
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M modules/freeswitch/fs_api.c
    M modules/freeswitch/fs_proc.c

  Log Message:
  -----------
  freeswitch: Improve logging


  Commit: 995d02f88600d54741d0b7fc4dea1a3f29cceac2
      https://github.com/OpenSIPS/opensips/commit/995d02f88600d54741d0b7fc4dea1a3f29cceac2
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M action.c
    M dprint.h
    M msg_translator.c

  Log Message:
  -----------
  Improve LM_BUG() macro

This allows syntax such as:

if (foo)
    LM_BUG("");
else
    bar;

We also drop the deprecated report_programming_bug() macro.


  Commit: 35f613ba81e98191fd6e583317679d5f9a09fe15
      https://github.com/OpenSIPS/opensips/commit/35f613ba81e98191fd6e583317679d5f9a09fe15
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M modules/freeswitch/fs_api.c
    M modules/freeswitch/fs_api.h
    M modules/freeswitch/fs_ipc.c
    M modules/freeswitch/fs_ipc.h
    M modules/freeswitch/fs_mod.c
    M modules/freeswitch/fs_proc.c

  Log Message:
  -----------
  freeswitch: Implement the fs_esl() API command

This API call allows execution of an arbitrary FreeSWITCH ESL command on
an arbitrary FS interface. It has the following flow:
    1. script worker
        - calls freeswitch_esl(), hence api->fs_esl()
        - fires an IPC job to the FS connection manager
        - busy-waits for an SHM response (with sleep())

    2. FS connection manager
        - receives the IPC job, runs the ESL command
        - places the reponse in SHM for the worker to find

    3. script worker
        - finds the corresponding response, stores it in the output
          pvar (if provided) and resumes the OpenSIPS script


  Commit: 97c31c87a384ad9f163ae56cf73c5e12145e503a
      https://github.com/OpenSIPS/opensips/commit/97c31c87a384ad9f163ae56cf73c5e12145e503a
  Author: Liviu Chircu <[hidden email]>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M modules/freeswitch_scripting/fss_ipc.c
    M modules/freeswitch_scripting/fss_ipc.h
    M modules/freeswitch_scripting/fss_mod.c

  Log Message:
  -----------
  freeswitch_scripting: Rename fs_cli() to freeswitch_esl()

Also adapt to the new interface / IPC changes.


Compare: https://github.com/OpenSIPS/opensips/compare/e47ac15610c2...97c31c87a384
_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel