I am trying various different options of building Asterisk 11 and these will be deployed on various servers. They are all built from the same sources and have what I presume to be some sort of checksum embedded in the version ID (26dd464).
In order to distinguish the various versions of the executable I would like to add my own version number or string on similar. I note that /usr/src/asterisk/main/version.c specifies a const char [] variable asterisk_version, but if I manually edit this it gets overwritten as part of the make process. Is there a sensible way I could specify some sort of identifying label (e.g. as a parameter passed to make or some such)?
In /usr/src/asterisk/build_tools/make_version_c you can specify it. This script overwrites the file you've mentioned (/usr/src/asterisk/utils/version.c).
Related
I'm trying to introduce a new directive which takes either a string or a variable as input and saves the values on configuration struct for later user in my code. I found that some directives in nginx are using ngx_http_compile_complex_value(&ccv) to compile the variables and ngx_http_complex_value() to get the original value of the directive's argument during the runtime. Similarly, some other directives are using ngx_http_script_compile(&sc) and ngx_http_script_run() to achieve the same.
I have found some documentation about scripts and complex values in nginx but I'm still not clear about the difference between these two.
Can anyone help me understand the difference and when to use complex_value vs script?
I've installed the Swagger Importer, which is just great. It saved a lot of setup time. It also enumerated all of our APIs optional parameters, which is also good because I don't have to reference docs; however, I don't want GET and POST requests to send the params when I haven't explicitly set the values. Is there a way to configure PAW to not send URL Params when they have no value? One option is to just duplicate an item and then prune the list, but it seems reasonable that there should be a way to simply ignore items that aren't set.
For example:
Don't GET:
http://domain.com/api/v1/users?maxResultCount=&isActive=true
(because maxResultCount is optional and not set)
Instead, do GET:
http://domain.com/api/v1/users?isActive=true
The current release, Paw Version 3.0.7 (Retail) now provides checkboxes on URL parameters.
Robot Framework allows you to import multiple resource files containing keywords with the same names, and to call them using their full name to differentiate between them. For example, if you have Resource1.robot that has a keyword called "Test Keyword" that does some action, and Resource2.robot that also has a keyword called "Test Keyword" that does a different action, when you import both resources into a test suite, your test cases can access those keywords with the syntax Resource1.Test Keyword or Resource2.Test Keyword depending on the functionality that you want.
Is there a way to do that with variables? I have two resource files - patient_records_resource.robot and patient_search_resource.robot. patient_records_resource defines a variable ${LAST NAME EDIT} | name=lname, and patient_search_resource defines a variable with the same name ${LAST NAME EDIT} | id=last-name. I'm running into the problem where a test case imports both of those files, and needs to access both of those edit boxes at different points, and consistently picks the wrong one. I have tried things like patient_search_resource.LAST NAME EDIT with no success, but that's approximately what I'm looking for.
I know I could just rename one of them, but I'd like to use that as a last resort solution. Everyone on my team makes sure to create unique variable names within a single resource file, but coming up with unique variable names across the whole test suite to avoid these collisions would add some overhead that we don't want.
There is no way to do that with variables.
All variables from resource files have the same priority. If multiple variables have the same name then only the one that was imported first is taken into use. [source]
Your only options are:
Splitting the suite with both imports into two sub-suites, ensuring that each sub-suite only imports one of the resources.
Your last resort solution: modifying your variable names to all be unique.
I agree that the latter option adds a bothersome amount of overhead, but, until RF changes the way it handles variables, it's probably your best option. Personally, I prefix all variables with a sequence of letters unique to the resource file (e.g. a resource named "Member_Central_Logging_Functions" might have all variables prefixed with MCLF).
I have a delimited file as input source to ingest data in marklogic using conten-pump through unix.There is no such column in the file that is unique throught to serve as the URI. Problem with this is that since duplicates(URI) is not possible, those records are skipped/overwritten for that particular URI.
The syntaxes available are:
-delimited_uri_id *my_column_name*
output_uri_prefix *my_prefix_string*
output_uri_suffix *my_suffix_string*
output_uri_replace pattern,'string'
The command for mlcp is:
bin/mlcp.sh import -host localhost -port 8042 -username name -password password-input_file_path hdfs://path/to/file -delimiter '|' -delimited_uri_id column_name-input_file_type delimited_text -mode distributed
The problem that lies here is that if I modify the above command and include:
-output_uri_prefix $(date +%s%N)
It takes the time(in nanoseconds) of execution of this command and prefixes for all URI.But that doesnt solve my problem since this value remains repeated. Same would happen for other options available too .What could be done to have all records ingested by the construction of unique URI for all records in some manner?
One way or another it is up to you to provide unique ids. For a delimited file the easiest answer might be to add a new column and populate it with a unique id, generated however you like.
Or you could use http://marklogic.github.io/recordloader/ DelimitedDataLoader with the special option ID_NAME=#AUTO. But keep in mind that ID_NAME=#AUTO will single-thread ingestion.
I have a necessity to add support for a proprietary headers that FPGA in our design inserts in incoming Ethernet frames between MAC header and payload. Obviously have to dig in tcpdump sources and libpcap, but could anybody give some hints at where exactly to start, so that I could save time?
The first thing you need to do is to get a DLT_/LINKTYPE_ value for your proprietary headers. See the link-layer header types page on the tcpdump.org Web site for the existing DLT_/LINKTYPE_ link-layer header type values and information on how to either use one of the DLT_USERn values internally or get a new value assigned if you plan to have people outside your organization use this.
Once you have the value assigned, you'll have to do some work on libpcap:
If you've been assigned a DLT_ value, you'll have to modify the pcap/pcap.h file to add that link-layer type (and change the DLT_MATCHING_MAX value in that header file, and LINKTYPE_MATCHING_MAX in pcap-common.c, so that they are >= your DLT_ value), or wait for whoever at tcpdump.org (which will probably be me) assigns your DLT_ value and updates the libpcap Git repository (at which point you could use top-of-trunk libpcap).
If you plan to do live capturing, you may have to add a module to libpcap to support live capturing on your hardware, or, if your device looks like a regular networking device to your OS, so that you can use its native capture mechanism, modify the module for that OS to map whatever link-layer header type value the OS uses (e.g., a DLT_ value on *BSD/OS X or an ARPHRD_ value on Linux) to whatever DLT_ you're using for your link-layer header type.
You'd have to modify gencode.c to be able to compile capture filters for your DLT_ value.
Once that's done, libpcap should now work.
Now, for tcpdump:
Add an if_print routine that processes the proprietary headers (whether it just skips them or prints things for them), calls ether_print(), and then returns the sum of the length of your proprietary headers and the Ethernet header (ETHER_HDRLEN as defined in ether.h). See ether_if_print() in print-ether.c for an example.
Add a declaration of that routine to interface.h and netdissect.h, and add an entry for it, with the routine name and DLT_, to ndo_printers[] if you copied ether_if_print() (which you should) or to printers[] if you didn't (if you didn't, you'll have to pass &gndo as the first argument to ether_print()). Those arrays are in tcpdump.c.